﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterExpert.master" AutoEventWireup="true" CodeFile="ReturnDevice.aspx.cs" Inherits="ExpertUsers_ReturnDevice" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Header1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <div style="background-color:#FF9933; direction:rtl;padding-bottom:20px;padding-top:10px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">
        <div style="padding-right:385px; width:100%">
        <asp:Image ID="Image2" runat="server" 
                        ImageUrl="~/Images/ManageUsers.png" Width="17%"  />
        </div>
     
      
        <div style="width:93%;margin:auto;background-color:#FFE1A4; border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 7px;">
       
        
          <div >
          <br />
<table style="direction:rtl;margin:auto; border-bottom-style: double; border-bottom-color: #E49218;" >
<tr>
    <td colspan="4" bgcolor="#E49218" align="center" >
        <asp:Label ID="Label4" runat="server" Text="جستجوی درخواست کالا" 
            Font-Bold="True" ForeColor="#FFFFCC"></asp:Label>
    </td>
 
    </tr>
        <tr>
            <td>
                &nbsp;
                <asp:Label ID="Label3" runat="server" Text="نوع کالا"></asp:Label>
            </td>
            <td>
                <asp:Label ID="Label2" runat="server" Text="شماره درخواست مشتری"></asp:Label>
            </td>
            <td>
                &nbsp;
                <asp:Label ID="Label1" runat="server" Text="شماره درخواست کالا"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
          
        </tr>
        <tr>
            <td>
                &nbsp;<asp:DropDownList ID="DrDevice" runat="server" DataSourceID="SqlDDevice" 
                    DataTextField="Name"  DataValueField="Id" AppendDataBoundItems="true" 
                    CssClass="textbox">
                        <asp:ListItem Text="انتخاب نوع کالا" Selected="True" Value="0" />
                    </asp:DropDownList>

                    <asp:SqlDataSource ID="SqlDDevice" runat="server" ProviderName="System.Data.SqlClient"
                     SelectCommand="SELECT [Id],[Name] FROM [TblDevice]" ConnectionString="<%$ ConnectionStrings:CON %>" ></asp:SqlDataSource>
            &nbsp;</td>
            <td>
                <asp:TextBox ID="txtRequstCust" runat="server" TextMode="Number" 
                    ToolTip="شماره درخواست مشتری" CssClass="textbox"></asp:TextBox>
                <br />
            </td>
            <td>
                <asp:TextBox ID="txtNumberRequest" runat="server" TextMode="Number" 
                    ToolTip="شماره درخواست کالا" CssClass="textbox"></asp:TextBox>
                &nbsp;
                </td>
            <td>
                &nbsp;
                <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click" 
                    Text="جستجو" Width="110px" CssClass="Button" />
            </td>
         
        </tr>
        
</table>
<br />
<br />
    <table style="width: 100%;direction:rtl" >
    
        <tr>
            <td colspan="6">

            
             <div style="border: 1px solid #FF9900;border-radius:3px;box-shadow: 0px 0px 10px rgba(189, 189, 189, 0.4);padding :10px;width:90%;margin:auto; background-color: FC6;">
                <div  class="headerTable" >
                <div style="width:10%;float:right">
                    <asp:Image ID="Image1" runat="server" src="../Images/ava_default_1.jpg" Height="40px" />
                </div>
                <div style="width:50%;float:right">
                    <h3><asp:Label ID="Label5" runat="server" Text="لیست کالاهای درخواست داده شده" ForeColor="#E87400"></asp:Label></h3>
                </div>
                </div>
                <div>
            <asp:GridView ID="GwRequestDevice" runat="server" AutoGenerateColumns="False" 
            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" CellSpacing="2"  Width="100%"  DataSourceID="SdRequseDevice" DataKeyNames="Id"
                    onrowcommand="GwRequestDevice_RowCommand" AllowSorting="true" >
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="شماره درخواست کالا " SortExpression="Id" />
                <asp:BoundField DataField="Serial" HeaderText="سریال کالا" SortExpression="Serial" />
                <asp:BoundField DataField="Name" HeaderText="نام کالا " 
                    SortExpression="Name" />
                <asp:BoundField DataField="CustFolderId" HeaderText=" شماره درخواست مشتری" 
                    SortExpression="CustFolderId" />
                        <asp:BoundField DataField="DateRequest" HeaderText=" تاریخ درخواست" 
                    SortExpression="DateRequest" />
              
                <asp:TemplateField>
                        <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" CausesValidation="false" CommandName="ReturnRequest" OnClientClick="if (!confirm('آیا از برگشت کالا مطمنید؟')) return false;" CommandArgument='<%#Eval("ReposDetailsId")%>' Text="برگشت کالا " runat="server"></asp:LinkButton>
           
                        </ItemTemplate>
                  </asp:TemplateField>

            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FFF1D4" />
            <SortedAscendingHeaderStyle BackColor="#B95C30" />
            <SortedDescendingCellStyle BackColor="#F1E5CE" />
            <SortedDescendingHeaderStyle BackColor="#93451F" />
        </asp:GridView>
        </div>
        </div>
        
        <asp:SqlDataSource ID="SdRequseDevice" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:CON %>" 
                                ProviderName="System.Data.SqlClient" 
            
                                SelectCommand="SELECT TblDeviceExpert.[CustFolderId],TblDeviceExpert.[Id],TblDeviceExpert.[ReposDetailsId],TblDeviceExpert.[DateRequest],TblDeviceExpert.[DateRequest],TblRepository.[Id],TblRepository.[DeviceId],TblReposDetail.[IdRepos],TblReposDetail.[serial],TblDevice.[Id],TblDevice.[Name]   FROM [TblDeviceExpert] JOIN [TblReposDetail] ON(TblReposDetail.[Id]=TblDeviceExpert.[ReposDetailsId]) JOIN [TblRepository] ON(TblRepository.[Id]=TblReposDetail.[IdRepos])Join [TblDevice] ON (TblRepository.[DeviceId]=TblDevice.[Id]) WHERE ([ExpertId] = @ExpertId)  ">
                                <SelectParameters>
                                    <asp:SessionParameter Name="ExpertId" SessionField="ExId" Type="Int32" />
                                </SelectParameters>
                            </asp:SqlDataSource>
        
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
        <td colspan="4" align="center" style="color:Green">
            <asp:Label ID="lblMessage1" runat="server" Font-Bold="True" ></asp:Label>
        </td>
        </tr>
    </table>
    </div>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Header" Runat="Server">
</asp:Content>

